GetItemIcon
GetItemIcon See which icon, if any, is attached to a menu item
#include <Menus.h> Menu Manager
void GetItemIcon(theMenu, whichItem, icon );
MenuHandle theMenu ; handle of menu containing item of inquiry
short whichItem ; ID of an item in theMenu
short *icon receives 'ICON' or 'cicn' resource ID-256 (0=none)
GetItemIcon obtains a value indicating which icon, if any, is associated with
a specified menu item. This can be used to see if a previous SetItemIcon call
succeeded.
theMenu is a handle leading to a variable-length MenuInfo structure. It
identifies the menu containing the item whose icon you wish to query.
whichItem identifies which item in theMenu to query. Items are numbered
sequentially with the topmost item having an ID of 1.
icon is the address of a 16-bit short integer. Upon return, it will
contain 0 if no icon is associated with the menu item. Otherwise, it
returns a value ranging from 1 to 255 that is 256 less than the
resource ID of the 'ICON' or 'cicn' resource. For instance, if this
contains 3, the resource ID of the icon is 259.
The designation as a short* is not a typo. A Pascal Byte data type is
actually a 16-bit word. If you use a 1-byte char variable, the Menu
Manager will overwrite the byte above it.
Returns: none